package
{
	import flash.display.MovieClip;
	import flash.events.Event;
	import flash.events.MouseEvent;
	import flash.text.TextField;
	import flash.text.TextFieldType;

	public class logo extends MovieClip
	{
		private var autor:campText = new campText(TextFieldType.DYNAMIC);
		private var profesor:campText = new campText(TextFieldType.DYNAMIC);
		private var scoala:campText = new campText(TextFieldType.DYNAMIC);
		private var limbaj:campText = new campText(TextFieldType.DYNAMIC);
		private var info:campText = new campText(TextFieldType.DYNAMIC);
		
		private var close:buton = new buton();
		
		public function logo()
		{
			addEventListener(Event.ADDED_TO_STAGE,initializare);
			
			close.addEventListener(MouseEvent.CLICK,closed);
		}
		
		private function initializare(e:Event)
		{	
			deseneaza();
			//--------
			close.nume="Close";
			close.culoare=0xff0000;
			close.width-=10;
			close.x=this.width-close.width;
			close.y=0;
			this.addChild(close);
			//--------
			autor.x=20;
			profesor.x=20;
			scoala.x=20;
			limbaj.x=20;
			info.x=40;
			
			autor.y=20;
			profesor.y=autor.y+autor.height+20;
			scoala.y=profesor.y+profesor.height+20;
			limbaj.y=scoala.y+scoala.height+20;
			info.y=limbaj.y+limbaj.height+60;
			
			autor.width=250;
			profesor.width=250;
			scoala.width=250;
			limbaj.width=250;
			info.width=430;
			
			autor.text="Realizat de : Tirca Bogdan";
			profesor.text="Profesor Coordonator : Tomulescu Dumitru";
			scoala.text="Scoala : Colegiul National Ecaterina Teodoroiu";
			limbaj.text="Realizat in : Action Script, IDE : Flash Builder";
			info.text="Introduceti numarul de noduri dorit, dupa care apasati pe butonul Adauga."+
					"\nPentru a adauga o muchie dati DubluClick pe 2 noduri diferite."+
					"\nPentru a sterge o muchie dati DubluClick pe muchia respectiva"+
					"\nPentru a realiza o parcurgere Depth First/Breadth First, introduceti nodul in"+
					"\ncampul asociat dupa care dati click pe butonul -Depth First- respectiv -Breadth First-";
			
			info.height=100;
			info.multiline=true;
			
			this.addChild(autor);
			this.addChild(profesor);
			this.addChild(scoala);
			this.addChild(limbaj);
			this.addChild(info);
		}
		
		private function deseneaza()
		{
			this.graphics.clear();
			
			this.graphics.beginGradientFill("linear",[0x00aabb,0x00ccaa],[0.9,0.9],[127,230]);
			this.graphics.drawRoundRect(0,0,stage.stageWidth,stage.stageHeight,10,10);
		}
		
		private function closed(e:MouseEvent):void
		{
			this.parent.removeChildAt(this.parent.getChildIndex(this));
		}
	}
}